<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title></title>
    <link href="${basePath}/css/bootstrap.min.css" rel="stylesheet">
    <script src="${basePath}/js/jquery-1.10.2.js"></script>
    <!--<script src="js/jquery.min.js"></script>-->
    <script src="${basePath}/js/uploadHead.js"></script>
  </head>
  <body>
  	<div style="width:85%;margin: 30px auto;">
			<form action="${basePath}/uploadheadimage" method="post" enctype="multipart/form-data">
			<input type="hidden" name="id" value="${user.id}">
		  	<!--input-group start-->
	    	<div id="preview">
	      	<img id="imghead" src="${headimagePath}/${user.headimage}" class="img-thumbnail" onclick="$('#previewImg').click();"
	      		style="width: 120px;height: 120px;margin: 0px auto 20px auto;display: block;">
	    	</div>
	    	<input type="file" name="fileImage" onchange="previewImage(this)" style="display: none;" id="previewImg">
	    	<button type="button" class="btn btn-primary btn-block btn-lg" style="width: 250px;margin: 20px auto 15px auto;" onclick="$('#previewImg').click();">点击上传</button>
        	<!--input-group end-->
			 	<button type="submit" class="btn btn-warning btn-block btn-lg" style="width: 250px;margin: 15px auto 15px auto;">保存</button>
				<button type="button" class="btn btn-default btn-block btn-lg" style="width: 250px;margin: 15px auto 30px auto;" onclick="location.href='${basePath}/setting'">返回</button>
			</form>
	  </div>
    <script src="${basePath}/js/jquery.min.js"></script>
    <script src="${basePath}/js/bootstrap.min.js"></script>
  </body>
</html>